<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-cn">
<title>我的商城</title>
<meta name="keywords" content="">
<meta name="description" content="">
<!--<link rel="shortcut icon" href="http://www.vmall.com/favicon.ico">-->
<link href="Public/Home/css/ec.css" rel="stylesheet" type="text/css">
<link href="Public/Home/css/myQzong.css" rel="stylesheet" type="text/css">
<!--<script src="js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>-->
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="Public/Home/js/area.js" type="text/javascript" charset="utf-8"></script>


<!-- 模态框的引用 -->
<!-- 后盾js的引入 -->
		<link rel="stylesheet" href="Public/Home/Common/hdjs/hdjs.css">
		<script src="Public/Home/Common/hdjs/hdjs.min.js"></script>
		<script>

			    function hd_modal_test() {
			
			        hd_modal({
			
			            width: 600,//宽度
			
			            height: 300,//高度
			
			            title: '您好',//标题
			
			            content: '此功能还未开启，给您带来的不便，深表歉意',//提示信息
			
			            button: true,//显示按钮
			
			            button_success: "确定",//确定按钮文字
			
			            button_cancel: "关闭",//关闭按钮文字
			
			            timeout: 0,//自动关闭时间 0：不自动关闭
			
			            shade: true,//背景遮罩
			
			            shadeOpacity: 0.9,//背景透明度
			
			            success: function () {//点击确定后的事件
			
			 
			
			            },
			
			            cancel: function () {//点击关闭后的事件
			
			 
			
			            }
			
			        });
			
			    }
			
			</script>



<body class="wide detail">


<!-- 引入公共头部 -->
		{{include file="../Common/header"}}

<div class="hr-10"></div>
<div class="g">
	<!--面包屑 -->
<div class="breadcrumb-area">
	<a href="{{U('Index/index')}}" title="首页">首页</a>&nbsp;&nbsp;\&nbsp;&nbsp;<em id="personCenter"><a href="javascript:;" title="我的商城">我的商城</a></em><em id="pathPoint">&nbsp;&nbsp;\&nbsp;&nbsp;</em><span id="pathTitle">我的订单</span>
</div>	
</div>

<div class="hr-10"></div>

<!--中间开始-->
<div class="g">
	
<!--右侧订单管理开始-->	
<div class="fr u-4-5 myQzong_main"><!-- 20141212-栏目-start -->
	<div class="section-header">
	    <div class="fl">
	        <h2><span>我的订单</span></h2>
	    </div>
	    <div class="fr">
	    	<div class="ec-tab" id="ec-tab">
	    	<!-- 	<ul>
	    			<li class="current"><a href=""><span>最近三月内订单<em id="count-seltime-0">1</em></span></a></li>
	    			<li><a href=""><span>三个月前订单<em style="display: none;" id="count-seltime-1">0</em></span></a></li>
	    		</ul> -->
	    		<div class="ec-tab-arrow" style="width: 136px; left: 0px;"></div>
	    	</div>
	    </div>
	</div>
	<!-- 20141212-栏目-end -->
	

	<!-- 20141222-我的订单-订单类别-start -->
	<div class="myOrder-cate" id="myOrder-cate">
		<ul>
			<li class="current"><a href="javascript:;" ><span>全部<em></em></span></a></li>
			<li><a href="javascript:;"><span>待支付<em  id="daizifu">{{count($orderDataOne)}}</em></span></a></li>
			<li><a href="javascript:;"><span>待收货<em>{{$orderDataTwo}}</em></span></a></li>
			<li><a href="javascript:;"><span>已完成<em>{{$orderDataThree}}</em></span></a></li>
		</ul>
	</div>
	
	
	<!-- 20141222-我的订单-订单类别-end -->
	<!-- 20141222-我的订单-列表-start -->

	<div class="myOrder-record" id="myOrders-list-content">
	{{if value="$orderDataOne"}}
		<!-- 20141222-我的订单-列表-订单合并-start -->
		<div class="myOrder-control">
			<label class="inputbox" for="checkAllBox">
				<input class="checkbox  check_box"   i='0'  checked="" onclick="setCheck(this)"  id="checkAllBox" name="checkAllBox" type="checkbox"><span>全选</span>
			</label>
			<a href="javascript:;" class="button-operate-merge-pay" id="topButton" onclick="hd_modal_test();" ><span>合并支付</span></a>
		</div>
		<!-- 20141222-我的订单-列表-订单合并-end -->
		<div class="list-group-title">
			<table border="0" cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<th class="col-pro">商品</th>
						<th class="col-price">单价/元</th>
						<th class="col-quty">数量</th>
						<th class="col-pay">实付款/元</th>
						<th class="col-operate">订单状态及操作</th>
					</tr>
				</thead>
			</table>
		</div>
		{{foreach  from="$orderDataOne" key="$k" value="$v"}}
		<div class="list-group   list-group-qxdd" id="list-group">
					<div class="list-group-item">
						<div class="o-info">
								<div class="col-info">
										<input class="checkbox   checkbox_qx  biaoji"    i='0' checked=""  onclick="setCheckQx(this)"  name="payCheck"  paymentstatus="2" type="checkbox">
									<span class="o-date">{{date('Y-m-d h:i:s',$v['time'])}}</span>
									<span class="o-no">订单号：<a href="javascript:;" title="1790122384">{{$v['number']}}</a></span>
									<!--
				                    	ie6下鼠标悬停追加ClassName： hover
				                    	示例：[ o-logistics hover ] 
				                    -->
								</div>
								<div class="col-state">
									待处理&nbsp;|&nbsp;待支付
								</div>
						</div>
						<div class="o-pro">
							<table border="0" cellpadding="0" cellspacing="0">
			        			<tbody>
			                        <!-- 组合套餐列表 -->
									<!-- 普通商品列表 -->
											
		                        			{{foreach from="$orderListData[$k]" key="$kk"  value="$vv" }}
		                        			<tr>
					        					<td class="col-pro-img">
					    							<p class="p-img">
					    								<a title="" href="{{U('Detail/index',['gid'=>$vv['shop_goods_gid']])}}" target="_blank">
				                                    		<img alt="" src="{{$vv['pic']}}">
				                                    	</a>
					    							</p>
					        					</td>
					        					<td class="col-pro-info">
													<p class="p-name">
														<a title="" target="_blank" href="{{U('Detail/index',['gid'=>$vv['shop_goods_gid']])}}">{{$vv['gname']}} {{foreach from="$vv['gtvalue']"   value="$vvv"}}&rarr;{{$vvv}}{{endforeach}}</a>
													</p>
					        					</td>
					        					<td class="col-price"><em>¥</em><span>
					        								{{$vv['subtotal']}}.00
					        					</span>
					        					</td>
					        					<td class="col-quty">{{$vv['quantity']}}</td>
				        				
				        						{{if value="$kk eq 0" }}
			        							<td rowspan="{{count($orderListData[$k])}}" class="col-pay">
			        								<p><em>¥</em><span>
			        												{{$v['total']}}.00
						        								
							        				</span></p>
			        							</td>
			        							
		        								<td rowspan="{{count($orderListData[$k])}}" class="col-operate">
																<p class="p-button"> 
																	<a class="button-operate-pay" href="javascript:;" target="_blank">
																<span  class="ljzfu" onclick="hd_modal_test();">
																	立即支付
																</span>
																</a></p>
		        											<!-- <p class="p-link"><a href="#">修改订单</a></p> -->
		        											<p class="p-link">
		        												<a href="javascript:;"    orderOid="{{$v['oid']}}"   class="qxddan" >取消订单</a>
		        											</p>
		        									<!-- <p class="p-link"><a href="#">订单详情</a></p> -->
		        								</td>
												{{endif}}
					        				</tr>
					        				{{endforeach}}
		                        	<!-- 普通商品列表 end -->
			        			</tbody>
			        		</table>
						</div>
					</div>
		</div>
		{{endforeach}}
		<!-- 20141222-我的订单-列表-订单合并-start -->
		<div class="myOrder-control " id="myOrder-control-bottom">
			<label class="inputbox" id="bottomCheckBoxDiv" name="bottomCheckBoxDiv">
				<!-- 20140819-我的订单-合并付款-start -->
					<input class="checkbox    check_box" id="bottomCheckAllBox" name="bottomCheckAllBox" type="checkbox" checked="checked"   i='0'  checked=""  onclick="setCheck(this)"><span>全选</span>
				<!-- 20140819-我的订单-合并付款-end -->
			</label>
			<a href="javascript:;" class="button-operate-merge-pay" id="bottomButton" onclick="hd_modal_test();"><span   >合并支付</span></a>
		</div>

		{{else}}
		<center><h2 style="font-size:20px;color:#CA151E">您还没有未支付订单，请添加有效订单!</h2></center>
		{{endif}}
		<!-- 20141222-我的订单-列表-订单合并-end -->
		<div class="list-group-page">
			<div class="pager" id="list-pager"></div>
		</div>
	</div>
</div>
<!--右侧订单管理结束-->





<!--右侧收货地址开始-->
<div class="fr u-4-5 myQzong_main" style="display: none;"><!-- 20141212-栏目-start -->
	<div class="section-header">
	    <div class="fl">
	        <h2><span>个人信息管理</span></h2>
	    </div>
	</div><!-- 20141212-栏目-end -->
	<div class="hr-20"></div>
	<!-- 20141216-我的收货地址-表单-编辑地址-start -->
	<div class="myAddress-edit" id="myAddress-edit">
	    <div class="form-edit-panels" id="form-edit-panels">
		    <form id="myAddress-form" action="javascript:;" autocomplete="off" method="post">
	            <div class="form-edit-table">
	                <table border="0" cellpadding="0" cellspacing="0">
	                	<tbody>
	                        <tr>
	                            <th><span class="required">*</span><label for="consignee">用户昵称：</label></th>
	                            <td>
	                            	<input maxlength="20" name="consignee" id="consignee" class="text span-130" type="text">
	                            	<label id="consignee-msg"></label>
	                            </td>
	                        </tr>
	                        


	                        <!-- 城市联动的引用 -->
	                        <script type="text/javascript">
								$(function(){
									//初始化方法
									area.init('a');
									//修改的时候默认被选中效果
									// area.selected('黑龙江','哈尔滨','道里区');
								})
							</script>
	                        <tr>
	                            <th rowspan="2" class="selecte-vat"><span class="required">*</span><label for="province">用户地址：</label></th>
	                            <td>
									<div id="myAddress-region" class="inline-block">
										<span class="ol_linkSelect ol_linkSelect_region">
										<select name="a1" id="a1" style="margin-left: 17px;width:105px;height:35px"></select>
					  					<select name="a2" id="a2" style="margin-left: 17px;width:105px;height:35px"></select>
										<select name="a3" id="a3" style="margin-left: 17px;width:105px;height:35px"></select>
									</span>
									</div>
									<label id="myAddress-msg"></label>
								</td>
	                        </tr>
	                        
	                        <tr class="tr-rel">
	                            <td>
	                            	<center><textarea  style="width:550px;height:100px;margin-top:20px;padding:10px"  placeholder="详细信息"  id="address_desc" rows="" cols=""></textarea></center>
	                            </td>
	                        </tr>
	                        <tr>
	                            <th><span class="required">*</span><label for="mobile">手机号码：</label></th>
	                            <td>
									<div class="inline-block vam">
										<input  maxlength="15" name="mobile" id="mobile" class="text span-130 ime-disabled" alt="tel-msg" type="text">
										<span style="color:#009800;display:none" class="span_right">	&radic;</span>
										<span style="color:red;display:none" class="span_false"> 	&Chi;</span>
									</div>
								
									<div>
										<label id="tel-msg">
											
										</label>
									</div>
				    			</td>
	                        </tr>
	                       <!--  <tr>
	                            <th>&nbsp;</th>
	                            <td>
	                            	<label class="inputbox"><input class="checkbox" name="defaultFlag" value="1" id="myAddress-default" type="checkbox"><span>设为默认收货地址</span></label>
	                            </td>
	                        </tr> -->
	                        <tr class="tr-action">
	                        	<th>&nbsp;</th>
	                        	<td>
	                        		<div id="form-edit-button">
	                        			<input id="button-ok" class="button-action-ok" value="用户自设置" type="submit">
	                        			<a href="javascript:;" id="button-cancel" class="button-action-cancel" ><span>清&nbsp;&nbsp;除</span></a>
	                        			<label class="label-info" id="submit-msg"></label>
	                        		</div>
	                        	</td>
	                        </tr>
	                    </tbody>
	                </table>
	            </div>
		    </form>
	    </div>
	</div>
	<!-- 20141216-我的收货地址-表单-编辑地址-end -->
	<div class="hr-30"></div>
	<!-- 20141216-我的收货地址-列表-start -->
	<!--表单-我的收货地址 -->
	<div style="display: block;" class="myAddress-record hide" id="myAddress-record">
		<div class="list-group-title">
			<table border="0" cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<th class="col-name">用户昵称</th>
						<th class="col-address">用户地址</th>
						<!-- <th class="col-zip">邮编</th> -->
						<th class="col-tel">手机/电话</th>
						<!-- <th class="col-operate">操作</th> -->
					</tr>
				</thead>
			</table>
		</div>
		<div class="list-group" id="list-group">
			<div class="list-group-item" id="myAddress-area-29651555">
				<table border="0" cellpadding="0" cellspacing="0">
					<tbody>
					
						<tr>
							<td class="one col-name"  >{{$userData['username']}}</td>
							<td class="one col-address"  style="text-align:center;">{{if value="$userData['address']"}}{{$userData['address']}}{{else}}请先设置{{endif}}</td>
							<td class="one col-zip">{{if value="$userData['telphone']"}}{{$userData['telphone']}}{{else}}请先设置{{endif}}</td>
					
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<!--右侧收货地址结束-->



<!--左侧导航-->
<div class="fl u-1-5">
<!--左边菜单开始 -->
<div class="mc-menu-area">
	<div class="h"><a href="javascript:void(0);" class="button-go-mc" title="我的商城"><span>我的商城</span></a></div>
    <div class="b" id="myQzong_list">
        <ul>
        	<li>
        		<h3>
        			<span>订单中心</span>
        		</h3>
            	<ol class="list">
                	<li class="current" id="li-order"><a href="javascript:void(0)" title=""><span>我的订单</span></a></li>
                    <li id="li-myAddress"><a href="javascript:void(0)" title=""><span>个人信息管理</span></a></li>
                </ol>
          </li>    
        </ul>
    </div>

    <div class="f"></div>
</div>


<script type="text/javascript">

// 订单栏的全选和非全选的函数代码
	function setCheck(myself){
				var i=$(myself).attr('i');
				if(i==1){
					// alert(i);
					$('.checkbox_qx').prop('checked',true);
					$('.checkbox_qx').addClass('biaoji');
					$('.check_box').prop('checked',true);

					$('.check_box').attr('i',0);
				}else{
					// alert(i);
					$('.checkbox_qx').prop('checked',false);
					$('.checkbox_qx').removeClass('biaoji');
					$('.check_box').prop('checked',false);
					$('.check_box').attr('i',1);
				}
			}	


			function setCheckQx(myself){
				var i=$("#panduanqx").attr("i");
				var s=$(myself).attr('i');

				if(s==0){
					$(myself).prop('checked',false);
					$(myself).removeClass('biaoji');
					$(myself).attr('i','1');
				}else{
					$(myself).prop('checked',true);
					$(myself).addClass('biaoji');
					$(myself).attr('i','0');
				}
				var len=$(".biaoji").length;
				if(len!=$('.checkbox_qx').length){
					$('.check_box').prop('checked',false);
					$('.check_box').attr('i',1);
				}else{
					$('.check_box').prop('checked',true);
					$('.check_box').attr('i',0);
				}
				
			}














$(function(){

	$('#myQzong_list .list li').click(function(){
		var q=$(this).index();
//		document.title = q;
		$(this).addClass('current').siblings().removeClass('current');

		$('.myQzong_main').eq(q).css("display","block").siblings(".myQzong_main").css("display","none");

		$('#pathTitle').html($(this).find('span').html());
	});	




	// 我的订单，页的信息处理取消订单的ajax
	$('.qxddan').click(function(){
		if(confirm('你确认取消订单吗？')){
			var orderOid=$(this).attr('orderOid');
			var ps=$(this);
			$.ajax({
				type:'POST',
				url:'{{U('Person/twoAjax')}}',
				data:{orderOid},
				dataType:'json',
				success:function(phpData){
					// 在这里不能用this，在ajax中不能使用this，this在这里代表了ajax这个对象
					ps.parents('div.list-group').remove();
					var temp=$('#daizifu').text()-1;
					$('#daizifu').text(temp);
					// ps.parentsUntil('.myOrder-record').remove();
					
				}

			})
		}
		

	})




	




	// 给用户信息的手机添加验证事件
	$('#mobile').blur(function(){
	// 验证手机号
		var pattern = /^1[34578]\d{9}$/; 
		var phone=$(this).val(); 
		var temp=pattern.test(phone);
		if(temp){
			$('.span_right').show();
			$('.span_false').hide();
		}else{
			$('.span_false').show();
			$('.span_right').hide();
			
			setTimeout("ps()",3000);
		}
	})


	$('#button-ok').click(function(){
		var name=$('#consignee').val();
		var a1=$('#a1').val();
		var a2=$('#a2').val();
		var a3=$('#a3').val();
		var a4=$('#address_desc').val();
		var str=a1+'|'+a2+'|'+a3+'|'+a4;
		var telphone=$('#mobile').val();
		if(name&&a1&&a2&&a3&&a4&&telphone){
			$.ajax({
				type:'POST',
				url:'{{U('Person/oneAjax')}}',
				data:{name,str,telphone},
				dataType:'json',
				success:function(phpData){

					$('.one.col-name').html(phpData.username);
					$('.one.col-address').html(phpData.address);
					$('.one.col-zip').html(phpData.telphone);
				}
			})
		}else{
			alert('请把个人信息填写完整');
		}

	})
		
	// 清除数据表中信息
	
	$('#button-cancel').click(function(){
		$('#consignee').val('');
		$('#a1').val('请选择');
		$('#a2').val('请选择');
		$('#a3').val('请选择');
		$('#address_desc').val('');
		$('#mobile').val('');
		$('.span_false').hide();
		$('.span_right').hide();
			
	})
	




})
// 定时器中的方法，不放到外部找不到他，我 去了
		function ps(){
			$('#mobile').val('');
		}	



        

    
</script>





<!--左边菜单结束-->
</div>
<!--左侧导航-->
</div>
<!--中间结束-->


<div class="hr-80"></div>
<!--口号-20121025 -->
<div class="slogan">
	<ul>
		<li class="s1"><i></i>500强企业&nbsp;品质保证</li>
		<li class="s2"><i></i>7天退货&nbsp;15天换货</li>
		<!-- <li class="s3"><i></i>99元起免运费</li> -->
		<li class="s3"><i></i>
			<span>99元起免运费</span>
</li>
		<li class="s4"><i></i>448家维修网点&nbsp;全国联保</li>
	</ul>
</div>


<footer class="footer">
   
	<div class="footer-warrant-area">
		<p>
		<a textvalue="隐私政策" title="隐私政策" target="_blank" href="image/20160226162651249.png" title="公安备案" border="0" height="20" hspace="0" vspace="0" width="20">
		<span style="font-size:15px;font-family:宋体">
			<span style="font-size:12px;font-family:arial,helvetica,sans-serif;"> 苏公网安备
		</span>
		<span style="font-size:12px;font-family:arial,helvetica,sans-serif;">
			 32011402010009号
		</span>
		</span>
	</a> | <a target="_blank" href="http://www.miitbeian.gov.cn/">苏ICP备09062682号-9</a> | 增值电信业务经营许可证：苏B2-20130048 | <a target="_blank" href="http://res.vmallres.com/certifiimage/wwwz.jpg">网络文化经营许可证：苏网文[2012]0401-019号
	</a>
		</p>
		<p>
			<br>
			<a target="_blank" href="http://res.vmallres.com/certifiimage/wwwz.jpg">
				
			</a>
		</p>
		<p>
		</p>
	</div><!--授权结束 -->
	
</footer>


</body>
</html>